export const consts = {
  containerFolderName: "pkg-01-container",
  toolFolderName: "pkg-02-tool",
  abstractFolderName: "pkg-03-abstract",
  virtualFolderName: "pkg-04-virtual",
  behaviorFolderName: "pkg-05-behavior",
  elmtFolderName: "pkg-06-elmt",
  routerFolderName: "pkg-07-route",
  entityFolderName: "pkg-08-entity",
  prebuildFolderName: "pkg-99-prebuild-node-script",
  defaultRootCaseFolderName: "pkg-a0-default-root-case",
  coverRootCaseFolderName: "pkg-a1-cover-root-case",
  prebuildOutDir: "dist",
  error_loading_ms: 2000,
  errot_token_expired: "000000",
  title: "Ticmart - ",
  LOG_LEVEL: "DEBUG" as "DEBUG" | "INFO" | "WARN" | "ERROR",
  HTTP_BASE_PATH: "http://localhost:8081",
  PAD: "ZWF",
  firstOrder: -Number.MAX_VALUE,
  lastOrder: Number.MAX_VALUE,
  gradientSeconds: 618,
  VIEW: "DIV"
};
export const csses = {
  UT: "px",
  backgroundColor: "white",
  size: { text: "1em" },
  primaryColor: `#005EFF`,
  secondaryColor: `#BBD631`,
  padding: {
    large: 64,
    medium: 32,
    mini: 16
  },
  maxSectionWidth: 1200
};
export const child = (level: number, ...subs: number[]) => {
  const nums = [level, ...subs];
  let s = `&`;
  for (let i = 0; i < nums.length; i++) {
    const sub = nums[i];
    if (i % 2 === 0) {
      s += `>${consts.VIEW}`.repeat(sub);
    } else if (i % 2 === 1) {
      if (sub > 0) s += `:nth-child(${sub})`;
      if (sub < 0) s += `:nth-last-child(${-sub})`;
    } else {
      throw new Error("Impossible Error: ? % 2 not in [0, 1]");
    }
  }
  return s;
};
